﻿// code03050101.cpp : 数组
// 字符数组的特殊性

#include <iostream>
using namespace std;

int main()
{
    char a1[] = { 'C','+','+' };
    char a2[]= { 'C','+','+','\0' };
    char a3[] = "C++";//a3与a2等价
    const char a4[3] = "C++";//报错！没有空间存放'\0'

    cout << a3;//输出"C++"
    cout << a2;//输出"C++"
    cout << a1;//报错！输出"C++"之后会有未知错误
    return 0;
}


